<?php
/**附件表视图模型
 * @Author: 976123967@qq.com
 * @Date:   2014-09-21 21:54:09
 * @Last Modified by:   chen
 * @Last Modified time: 2014-09-21 22:37:23
 */
class UploadViewModel extends ViewModel{


	protected $tableName = 'upload';

	public $viewFields = array(
	
		'upload'=>array(
			'*',
			'_type'=>'INNER',
		),
		'user'=>array(
			'username',
			'_type'=>'INNER',
			'_on'=>'upload.user_uid=user.uid'
		),

	);

	/**
	 * [find_limit 读取数据]
	 * @param  [type] $order [description]
	 * @param  [type] $limit [description]
	 * @return [type]        [description]
	 */
	public function find_limit($order,$limit)
	{
		return $this->order($order)->limit($limit)->select();
	}



	
}